/**
 * 
 * 收支统计请求
 * 
 */
import Axios from 'axios'

import { requestHeader } from './requestHeader' 


// 获取收费信息

export function getInfo(){

    return Axios({
        url: requestHeader() + '/IncomeAndExpenses/getInfo',
        method: 'get'
      })

}

// 获取退费信息
export function getTf(){

    return Axios({
        url: requestHeader() + '/IncomeAndExpenses/returnPremium',
        method: 'get'
      })

}

// 查询现金支付总金额 Cash
export function getCash(){

    return Axios({
        url: requestHeader() + '/IncomeAndExpenses/getCash',
        method: 'get'
      })

}


// 查询微信支付总金额 WeChat
export function getWeChat(){

    return Axios({
        url: requestHeader() + '/IncomeAndExpenses/getWeChat',
        method: 'get'
      })

}

// 查询支付宝支付总金额 Alipay
export function getAlipay(){

    return Axios({
        url: requestHeader() + '/IncomeAndExpenses/getAlipay',
        method: 'get'
      })

}

// 查询总金额 lumpSumExpenses
export function getlumpSumExpenses(){

    return Axios({
        url: requestHeader() + '/IncomeAndExpenses/lumpSumExpenses',
        method: 'get'
      })

}




// 查询退款总金额 totalRefund
export function gettotalRefund(){

    return Axios({
        url: requestHeader() + '/IncomeAndExpenses/totalRefund',
        method: 'get'
      })

}


//条件查询
export function queryInfo(pageNum, chargetype,chargestatus,startDate,endDate){


  return Axios({

    url:requestHeader() + '/IncomeAndExpenses/queryInfo',
    method:'post',
    params:{
        'pageNum': pageNum,
        'chargetype': chargetype,
        'chargestatus':chargestatus,
        'startDate': startDate,
        'endDate':endDate
    }


  }
  
  )

}


//分页查询

export function paging(pageNum){

  return Axios(
    {
        url: requestHeader() + '/IncomeAndExpenses/paging',
        method:'post',
        params:{"pageNum":pageNum}
    }
    
    
    )

}


//年月表表统计信息 
export function monthlyReport(num){

  return Axios({
    url: requestHeader() + '/monthlyReport/getMonthlyReport',
    method: 'get',
    params:{"num":num}
  })  
}


//获取一年的信息
export function annualStatistics(year){

  return Axios({
    url: requestHeader() + '/monthlyReport/annualStatistics',
    method: 'get',
    params:{"year":year}
  })  
}





package com.his.his_system.controller.DataStatisticsController;  
2   
3  import com.github.pagehelper.PageHelper;  
4  import com.github.pagehelper.PageInfo;  
5  import com.his.his_system.domain.DzmHisCarePkg;  
6  import com.his.his_system.domain.MonthlyStatistics;  
7  import com.his.his_system.service.DzmHisCarePkgService;  
8  import org.springframework.web.bind.annotation.GetMapping;  
9  import org.springframework.web.bind.annotation.RequestMapping;  
10  import org.springframework.web.bind.annotation.RestController;  
11   
12  import javax.annotation.Resource;  
13  import java.util.List;  
14   
15  /**  
16  * 年月报表统计  
17  */  
18  @RestController  
19  @RequestMapping("monthlyReport")  
20  public class MonthlyReportController {  
21   
22  @Resource  
23  private DzmHisCarePkgService dzmHisCarePkgService;  
24   
25   
26   
27  //分页显示条数  
28  private static final int PAGE_SIZE=4;  
29   
30  @GetMapping("getMonthlyReport")  
31  PageInfo<DzmHisCarePkg> getMonthlyReport(Integer num){  
32   
33   
34  // 设置分页  
35  PageHelper.startPage(num,PAGE_SIZE);  
36   
37  PageInfo<DzmHisCarePkg> page = new PageInfo<DzmHisCarePkg>(dzmHisCarePkgService.getMonthlyReport());  
38   
39   
40  return page;  
41  }  
42   
43  /**  
44  * 获取某年每月的支付信息  
45  * @param year  
46  */  
47  @GetMapping("/annualStatistics")  
48  List<MonthlyStatistics> annualStatistics(String year){  
49   
50  return dzmHisCarePkgService.annualStatistics(year);  
51   
52  }  
53   
54   
55   
56   
57  } 